<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::HTTPSConnection Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32 HTTPS Server
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1HTTPSConnection.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhttpsserver_1_1HTTPSConnection-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">httpsserver::HTTPSConnection Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Connection class for an open TLS-enabled connection to an <a class="el" href="classhttpsserver_1_1HTTPSServer.html" title="Main implementation of the HTTP Server with TLS support. Use HTTPServer for plain HTTP...">HTTPSServer</a>.  
 <a href="classhttpsserver_1_1HTTPSConnection.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="HTTPSConnection_8hpp_source.html">HTTPSConnection.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for httpsserver::HTTPSConnection:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPSConnection__inherit__graph.png" border="0" usemap="#httpsserver_1_1HTTPSConnection_inherit__map" alt="Inheritance graph"/></div>
<map name="httpsserver_1_1HTTPSConnection_inherit__map" id="httpsserver_1_1HTTPSConnection_inherit__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPConnection.html" title="Represents a single open connection for the plain HTTPServer, without TLS. " alt="" coords="11,80,207,107"/>
<area shape="rect" id="node3" href="classhttpsserver_1_1ConnectionContext.html" title="Internal class to handle the state of a connection. " alt="" coords="5,5,212,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for httpsserver::HTTPSConnection:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPSConnection__coll__graph.png" border="0" usemap="#httpsserver_1_1HTTPSConnection_coll__map" alt="Collaboration graph"/></div>
<map name="httpsserver_1_1HTTPSConnection_coll__map" id="httpsserver_1_1HTTPSConnection_coll__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPConnection.html" title="Represents a single open connection for the plain HTTPServer, without TLS. " alt="" coords="11,171,207,197"/>
<area shape="rect" id="node3" href="classhttpsserver_1_1ConnectionContext.html" title="Internal class to handle the state of a connection. " alt="" coords="5,95,212,121"/>
<area shape="rect" id="node4" href="classhttpsserver_1_1WebsocketHandler.html" title="httpsserver::WebsocketHandler" alt="" coords="5,5,212,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af80647478287d987e781652fcd21935c"><td class="memItemLeft" align="right" valign="top"><a id="af80647478287d987e781652fcd21935c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPSConnection</b> (<a class="el" href="classhttpsserver_1_1ResourceResolver.html">ResourceResolver</a> *resResolver)</td></tr>
<tr class="separator:af80647478287d987e781652fcd21935c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4e339f99810bf6552e86ad2cce788b9"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPSConnection.html#ab4e339f99810bf6552e86ad2cce788b9">initialize</a> (int serverSocketID, SSL_CTX *sslCtx, <a class="el" href="classhttpsserver_1_1HTTPHeaders.html">HTTPHeaders</a> *defaultHeaders)</td></tr>
<tr class="separator:ab4e339f99810bf6552e86ad2cce788b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1622cd27578cce6135fcccd172af77be"><td class="memItemLeft" align="right" valign="top"><a id="a1622cd27578cce6135fcccd172af77be"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>closeConnection</b> ()</td></tr>
<tr class="separator:a1622cd27578cce6135fcccd172af77be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97b349a939daf771b69850c7d3566640"><td class="memItemLeft" align="right" valign="top"><a id="a97b349a939daf771b69850c7d3566640"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>isSecure</b> ()</td></tr>
<tr class="separator:a97b349a939daf771b69850c7d3566640"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classhttpsserver_1_1HTTPConnection"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classhttpsserver_1_1HTTPConnection')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classhttpsserver_1_1HTTPConnection.html">httpsserver::HTTPConnection</a></td></tr>
<tr class="memitem:ab7bf3e57776f965a887d3d736a70578b inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="ab7bf3e57776f965a887d3d736a70578b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPConnection</b> (<a class="el" href="classhttpsserver_1_1ResourceResolver.html">ResourceResolver</a> *resResolver)</td></tr>
<tr class="separator:ab7bf3e57776f965a887d3d736a70578b inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a477f2a00400be60f3b0ca08ab53beda5 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPConnection.html#a477f2a00400be60f3b0ca08ab53beda5">initialize</a> (int serverSocketID, <a class="el" href="classhttpsserver_1_1HTTPHeaders.html">HTTPHeaders</a> *defaultHeaders)</td></tr>
<tr class="separator:a477f2a00400be60f3b0ca08ab53beda5 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e103c4b601199d575de6b6f29d7fb95 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top">virtual IPAddress&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPConnection.html#a5e103c4b601199d575de6b6f29d7fb95">getClientIP</a> ()</td></tr>
<tr class="separator:a5e103c4b601199d575de6b6f29d7fb95 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6331ad5e18ac367c0ac6477bebc25dd8 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="a6331ad5e18ac367c0ac6477bebc25dd8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>loop</b> ()</td></tr>
<tr class="separator:a6331ad5e18ac367c0ac6477bebc25dd8 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af00c9a10be467a64ece8f820e939190d inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPConnection.html#af00c9a10be467a64ece8f820e939190d">isClosed</a> ()</td></tr>
<tr class="separator:af00c9a10be467a64ece8f820e939190d inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d8889292d644962a859e6e9b0bff305 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPConnection.html#a6d8889292d644962a859e6e9b0bff305">isError</a> ()</td></tr>
<tr class="separator:a6d8889292d644962a859e6e9b0bff305 inherit pub_methods_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a439fe2d31322cc69ff35020bd7061087"><td class="memItemLeft" align="right" valign="top"><a id="a439fe2d31322cc69ff35020bd7061087"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><b>readBytesToBuffer</b> (byte *buffer, size_t length)</td></tr>
<tr class="separator:a439fe2d31322cc69ff35020bd7061087"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff3db7dffa6fef06137e4f0d80cfa082"><td class="memItemLeft" align="right" valign="top"><a id="aff3db7dffa6fef06137e4f0d80cfa082"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><b>pendingByteCount</b> ()</td></tr>
<tr class="separator:aff3db7dffa6fef06137e4f0d80cfa082"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0201fa0c2ce74aa321136d298864d503"><td class="memItemLeft" align="right" valign="top"><a id="a0201fa0c2ce74aa321136d298864d503"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>canReadData</b> ()</td></tr>
<tr class="separator:a0201fa0c2ce74aa321136d298864d503"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a575880dfed30ed8a46d71b875edf6c41"><td class="memItemLeft" align="right" valign="top"><a id="a575880dfed30ed8a46d71b875edf6c41"></a>
virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><b>writeBuffer</b> (byte *buffer, size_t length)</td></tr>
<tr class="separator:a575880dfed30ed8a46d71b875edf6c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a9fd43ee1d0a0ddfe175fbe42ecca0be9"><td class="memItemLeft" align="right" valign="top"><a id="a9fd43ee1d0a0ddfe175fbe42ecca0be9"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPRequest</b></td></tr>
<tr class="separator:a9fd43ee1d0a0ddfe175fbe42ecca0be9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8cb19d24f15bc4b03a83ae832b64a57"><td class="memItemLeft" align="right" valign="top"><a id="ae8cb19d24f15bc4b03a83ae832b64a57"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPResponse</b></td></tr>
<tr class="separator:ae8cb19d24f15bc4b03a83ae832b64a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_types_classhttpsserver_1_1HTTPConnection"><td colspan="2" onclick="javascript:toggleInherit('pro_types_classhttpsserver_1_1HTTPConnection')"><img src="closed.png" alt="-"/>&#160;Protected Types inherited from <a class="el" href="classhttpsserver_1_1HTTPConnection.html">httpsserver::HTTPConnection</a></td></tr>
<tr class="memitem:aee781f64b7522823dccc5cb5ccf5cbe6 inherit pro_types_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="aee781f64b7522823dccc5cb5ccf5cbe6"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<b>STATE_UNDEFINED</b>, 
<b>STATE_INITIAL</b>, 
<b>STATE_REQUEST_FINISHED</b>, 
<b>STATE_HEADERS_FINISHED</b>, 
<br />
&#160;&#160;<b>STATE_BODY_FINISHED</b>, 
<b>STATE_WEBSOCKET</b>, 
<b>STATE_CLOSING</b>, 
<b>STATE_CLOSED</b>, 
<br />
&#160;&#160;<b>STATE_ERROR</b>
<br />
 }</td></tr>
<tr class="separator:aee781f64b7522823dccc5cb5ccf5cbe6 inherit pro_types_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e282bc82a013a5de476ebbe02e326b inherit pro_types_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="ac3e282bc82a013a5de476ebbe02e326b"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>CSTATE_UNDEFINED</b>, 
<b>CSTATE_ACTIVE</b>, 
<b>CSTATE_CLOSED</b>
 }</td></tr>
<tr class="separator:ac3e282bc82a013a5de476ebbe02e326b inherit pro_types_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classhttpsserver_1_1HTTPConnection"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classhttpsserver_1_1HTTPConnection')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classhttpsserver_1_1HTTPConnection.html">httpsserver::HTTPConnection</a></td></tr>
<tr class="memitem:adc4a4fedc7127a43a44f943d01435cfb inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="adc4a4fedc7127a43a44f943d01435cfb"></a>
unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>_lastTransmissionTS</b></td></tr>
<tr class="separator:adc4a4fedc7127a43a44f943d01435cfb inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed7eef3aef4022cef6ee03de0eeff205 inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="aed7eef3aef4022cef6ee03de0eeff205"></a>
unsigned long&#160;</td><td class="memItemRight" valign="bottom"><b>_shutdownTS</b></td></tr>
<tr class="separator:aed7eef3aef4022cef6ee03de0eeff205 inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0023db5e5feeaf2841b74086114e9469 inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="a0023db5e5feeaf2841b74086114e9469"></a>
enum httpsserver::HTTPConnection:: { ... } &#160;</td><td class="memItemRight" valign="bottom"><b>_connectionState</b></td></tr>
<tr class="separator:a0023db5e5feeaf2841b74086114e9469 inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc507f44213441dec1aec67d4d3314cf inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memItemLeft" align="right" valign="top"><a id="afc507f44213441dec1aec67d4d3314cf"></a>
enum httpsserver::HTTPConnection:: { ... } &#160;</td><td class="memItemRight" valign="bottom"><b>_clientState</b></td></tr>
<tr class="separator:afc507f44213441dec1aec67d4d3314cf inherit pro_attribs_classhttpsserver_1_1HTTPConnection"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Connection class for an open TLS-enabled connection to an <a class="el" href="classhttpsserver_1_1HTTPSServer.html" title="Main implementation of the HTTP Server with TLS support. Use HTTPServer for plain HTTP...">HTTPSServer</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab4e339f99810bf6552e86ad2cce788b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4e339f99810bf6552e86ad2cce788b9">&#9670;&nbsp;</a></span>initialize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int httpsserver::HTTPSConnection::initialize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>serverSocketID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SSL_CTX *&#160;</td>
          <td class="paramname"><em>sslCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhttpsserver_1_1HTTPHeaders.html">HTTPHeaders</a> *&#160;</td>
          <td class="paramname"><em>defaultHeaders</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Initializes the connection from a server socket.</p>
<p>The call WILL BLOCK if accept(serverSocketID) blocks. So use select() to check for that in advance. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="HTTPSConnection_8hpp_source.html">HTTPSConnection.hpp</a></li>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPSConnection.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1HTTPSConnection.html">HTTPSConnection</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
